home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Source Code / Libraries / BSP Tree 1.2 / Sources / BSP Tree Demo / source / draw.cp < prev    next >
Encoding:
Text File  |  1995-03-26  |  2.9 KB  |  61 lines  |  [TEXT/MMCC]

  1. //------------------------------------------------------------------------------
  2. //    File:                    draw.cp
  3. //    Date:                    9/26/94
  4. //    Author:                Bretton Wade
  5. //
  6. //    Description:    this file contains the interface functions for some basic
  7. //                                drawing operations
  8. //
  9. //------------------------------------------------------------------------------
  10.  
  11. #include "view.h"
  12. #include "draw.h"
  13.  
  14. //------------------------------------------------------------------------------
  15. //    functions
  16. //------------------------------------------------------------------------------
  17. void        MoveTo (const point_2d &pt)                                                                                            //    move to a point_3d
  18. {                                                                                                                                                                //    begin
  19.     if (view::current)                                                                                                                        //    check for a valid view
  20.         view::current->MoveToPt (pt);                                                                                                //    move the pen
  21. }                                                                                                                                                                //    end
  22.  
  23. //------------------------------------------------------------------------------
  24. //    functions
  25. //------------------------------------------------------------------------------
  26. void        LineTo (const point_2d &pt)                                                                                            //    draw a line to a point_3d
  27. {                                                                                                                                                                //    begin
  28.     if (view::current)                                                                                                                        //    check for a valid view
  29.         view::current->LineToPt (pt);                                                                                                //    draw the line
  30. }                                                                                                                                                                //    end
  31.  
  32. //------------------------------------------------------------------------------
  33. //    functions
  34. //------------------------------------------------------------------------------
  35. void        Circle (const point_2d &a, const point_2d &b)                                                        //    draw a circle defined by a rectangle
  36. {                                                                                                                                                                //    begin
  37.     if (view::current)                                                                                                                        //    check for a valid view
  38.         view::current->Circle (a, b);                                                                                                //    draw the circle
  39. }                                                                                                                                                                //    end
  40.  
  41. //------------------------------------------------------------------------------
  42. //    functions
  43. //------------------------------------------------------------------------------
  44. void        CrossHair (const point_2d &pt)                                                                                    //    draw a crosshair at a point_3d
  45. {                                                                                                                                                                //    begin
  46.     if (view::current)                                                                                                                        //    check for a valid view
  47.         view::current->CrossHair (pt);                                                                                            //    draw the crosshair
  48. }                                                                                                                                                                //    end
  49.  
  50. //------------------------------------------------------------------------------
  51. //    functions
  52. //------------------------------------------------------------------------------
  53. void        DrawPolygon (polyptr poly)                                                                                            //    draw a polygon
  54. {                                                                                                                                                                //    begin
  55.     if (view::current)                                                                                                                        //    check for a valid view
  56.         view::current->DrawPolygon (poly);                                                                                    //    draw the polygon
  57. }                                                                                                                                                                //    end
  58.  
  59.  
  60. //------------------------------------------------------------------------------
  61.